using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using needle.UI.Controls.Flat.Windows.Forms.Collections;

namespace needle.UI.Controls.Flat.Windows.Forms
{
    public class TaskPanelBarDesigner : System.Windows.Forms.Design.ParentControlDesigner
    {
        private ISelectionService _selectionService = null;
        
		#region Properties

		public override ICollection AssociatedComponents
        {
            get 
            {
                if (base.Control is needle.UI.Controls.Flat.Windows.Forms.TaskPanelBar)
                    return ((needle.UI.Controls.Flat.Windows.Forms.TaskPanelBar)base.Control).TaskPanels;
                else
                    return base.AssociatedComponents;
            }
        }

        public ISelectionService SelectionService
        {
            get
            {
                if (_selectionService == null)
                {
                    _selectionService = (ISelectionService)GetService(typeof(ISelectionService));
                }

                return _selectionService;
            }
        }

        protected override bool DrawGrid
        {
            get { return false; }
        }

		#endregion
    }
}
